﻿/* '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 * '' Product        : Consilium
 * ''
 * '' Description    : Video Game
 * ''
 * '' Author         : Group #4
 * ''
 * '' Platforms      : This version is supported for Microsoft Windows
 * ''
 * ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 
 */

using GameCommon;

namespace GameModel
{
    // TODO: The entire unit module is a stub

    /// <summary>
    /// This non-instantiatable class defines the minimum properties
    /// an on-board unit must have.
    /// </summary>
    public abstract class Unit
    {
        public int maxHitpoints { get { return myMaxHitpoints; } }
        public int maxMovepoints { get { return myMaxMovepoints; } }
        public int baseDefense { get { return myBaseDefense; } }
        public UnitType type { get { return myType; } }
        public Team team { get { return myTeam; } }
        public int hitpoints;
        public int movepoints;

        // place on the map;
        public int x;
        public int y;

        protected int myMaxHitpoints;
        protected int myMaxMovepoints;
        protected int myBaseDefense;
        protected UnitType myType;
        protected Team myTeam;
    }

    public class Horseman : Unit
    {
        public Horseman(Team team, int x, int y)
        {
            myMaxHitpoints = 100;
            myMaxMovepoints = 5;
            hitpoints = myMaxHitpoints;
            movepoints = myMaxMovepoints;
            myBaseDefense = 10;
            myType = UnitType.Horseman;
            myTeam = team;
            this.x = x;
            this.y = y;
        }
    }

    public class Spearman : Unit
    {
        public Spearman(Team team, int x, int y)
        {
            myMaxHitpoints = 100;
            myMaxMovepoints = 3;
            hitpoints = myMaxHitpoints;
            movepoints = myMaxMovepoints;
            myBaseDefense = 30;
            myType = UnitType.Spearman;
            myTeam = team;
            this.x = x;
            this.y = y;
        }
    }

    public class Archer : Unit
    {
        public Archer(Team team, int x, int y)
        {
            myMaxHitpoints = 50;
            myMaxMovepoints = 3;
            hitpoints = myMaxHitpoints;
            movepoints = myMaxMovepoints;
            myBaseDefense = 10;
            myType = UnitType.Archer;
            myTeam = team;
            this.x = x;
            this.y = y;
        }
    }
}
